During code development, a code developer may include various code portions that the developer does not intend to be included in a final version of the code, as it is to be shipped to a customer. Such code portions may be included for a number of reasons. For example, the code portions may represent ideas of the developer which may or may not function as intended, and which may therefore have to be removed if they do not ultimately function in the intended manner. As another example, the code portions may be included merely to test a functionality of other code portions.
As yet another example, it may be the case that the code in question is designed to use data from a particular database, where that database may be non-existent or inaccessible (at the time of development), or may simply be too large and unwieldy to use during development. In such cases, the developer may create fictional data to use, with the intention of using the real data at a later date. One such situation may arise, for example, when the code is designed to search a customer database. Since the actual customer database may be very large, the developer may create fictional customer data for use during development of the code.
Similarly, when a mathematical algorithm is to be used within the code, the developer may avoid use of the algorithm simply by using a made-up output value during calculations. This may be done, for example, to avoid lengthy processing times, or in cases where the algorithm itself is still being developed.
Various techniques exist for avoiding the circumstance of erroneously shipping the code with the undesired code portions still present. For example, developers may use various reminders to themselves to remove or modify the code before delivery (e.g., may insert comments within the code containing a reminder to remove a particular code portion). The developers also may try to design the code portions such that their implementation is user-dependent (e.g., the code portions will operate only for the developers). Moreover, various testing procedures, with testers operating independently of the developers, may be implemented prior to shipping of the code.
However, although procedures exist for removing undesired code portions from a product, prior to shipping of the product to a customer, such conventional procedures often may be imperfect or unreliable. For example, developers may forget to check for and remove/modify the undesired code portions, or may overlook the code portions during a final review of the code. Moreover, testers may be even more susceptible to overlooking the undesired code portions, since they may be less familiar with the code than the developer.
As a result, a product may be shipped to a customer with the undesired code portions intact, resulting in faulty operation of the product. Often, particularly in situations where the code has passed through testing and other quality control measures, such faulty operation may not be immediately or easily noticed. For example, in the case where fictional data is used within the undesired code portion, the code may appear to run in an acceptable manner. In such cases, faulty operation of the code may not be noticed until after the code has been in use for some time, during which time it may have been outputting erroneous data.